﻿namespace Miao.ML
{
	public class IntData : WinMLData, IImplicitConversionToLong, IImplicitConversionToFloat, IImplicitConversionToDouble
	{
		public int value { get; }

		public sealed override DataType type => DataType.Int;

		long IImplicitConversionToLong.longValue => value;

		float IImplicitConversionToFloat.floatValue => value;

		double IImplicitConversionToDouble.doubleValue => value;

		public static string ToString(object value)
		{
			return value.ToString();
		}

		public IntData()
		{
		}

		public IntData(int value)
		{
			this.value = value;
		}

		public override string ToString()
		{
			return ToString(value);
		}
	}
}
